/**
 * <copyright>
 *
 * Copyright (c) 2011 Zeligsoft (2009) Limited
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors: 
 *   Zeligsoft (2009) Limited - Initial API and implementation
 *
 * </copyright>
 *
 */
package org.omg.deployment;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>CCM Component Port Kind</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see org.omg.deployment.DeploymentPackage#getCCMComponentPortKind()
 * @model extendedMetaData="name='CCMComponentPortKind'"
 * @generated
 */
public enum CCMComponentPortKind implements Enumerator {
	/**
	 * The '<em><b>Facet</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #FACET_VALUE
	 * @generated
	 * @ordered
	 */
	FACET(0, "Facet", "Facet"),

	/**
	 * The '<em><b>Simplex Receptacle</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #SIMPLEX_RECEPTACLE_VALUE
	 * @generated
	 * @ordered
	 */
	SIMPLEX_RECEPTACLE(1, "SimplexReceptacle", "SimplexReceptacle"),

	/**
	 * The '<em><b>Multiplex Receptacle</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #MULTIPLEX_RECEPTACLE_VALUE
	 * @generated
	 * @ordered
	 */
	MULTIPLEX_RECEPTACLE(2, "MultiplexReceptacle", "MultiplexReceptacle"),

	/**
	 * The '<em><b>Event Emitter</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #EVENT_EMITTER_VALUE
	 * @generated
	 * @ordered
	 */
	EVENT_EMITTER(3, "EventEmitter", "EventEmitter"),

	/**
	 * The '<em><b>Event Publisher</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #EVENT_PUBLISHER_VALUE
	 * @generated
	 * @ordered
	 */
	EVENT_PUBLISHER(4, "EventPublisher", "EventPublisher"),

	/**
	 * The '<em><b>Event Consumer</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #EVENT_CONSUMER_VALUE
	 * @generated
	 * @ordered
	 */
	EVENT_CONSUMER(5, "EventConsumer", "EventConsumer");

	/**
	 * The '<em><b>Facet</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Facet</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #FACET
	 * @model name="Facet"
	 * @generated
	 * @ordered
	 */
	public static final int FACET_VALUE = 0;

	/**
	 * The '<em><b>Simplex Receptacle</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Simplex Receptacle</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #SIMPLEX_RECEPTACLE
	 * @model name="SimplexReceptacle"
	 * @generated
	 * @ordered
	 */
	public static final int SIMPLEX_RECEPTACLE_VALUE = 1;

	/**
	 * The '<em><b>Multiplex Receptacle</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Multiplex Receptacle</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #MULTIPLEX_RECEPTACLE
	 * @model name="MultiplexReceptacle"
	 * @generated
	 * @ordered
	 */
	public static final int MULTIPLEX_RECEPTACLE_VALUE = 2;

	/**
	 * The '<em><b>Event Emitter</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Event Emitter</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #EVENT_EMITTER
	 * @model name="EventEmitter"
	 * @generated
	 * @ordered
	 */
	public static final int EVENT_EMITTER_VALUE = 3;

	/**
	 * The '<em><b>Event Publisher</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Event Publisher</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #EVENT_PUBLISHER
	 * @model name="EventPublisher"
	 * @generated
	 * @ordered
	 */
	public static final int EVENT_PUBLISHER_VALUE = 4;

	/**
	 * The '<em><b>Event Consumer</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Event Consumer</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #EVENT_CONSUMER
	 * @model name="EventConsumer"
	 * @generated
	 * @ordered
	 */
	public static final int EVENT_CONSUMER_VALUE = 5;

	/**
	 * An array of all the '<em><b>CCM Component Port Kind</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final CCMComponentPortKind[] VALUES_ARRAY = new CCMComponentPortKind[] {
			FACET, SIMPLEX_RECEPTACLE, MULTIPLEX_RECEPTACLE, EVENT_EMITTER,
			EVENT_PUBLISHER, EVENT_CONSUMER, };

	/**
	 * A public read-only list of all the '<em><b>CCM Component Port Kind</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<CCMComponentPortKind> VALUES = Collections
			.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>CCM Component Port Kind</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static CCMComponentPortKind get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			CCMComponentPortKind result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>CCM Component Port Kind</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static CCMComponentPortKind getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			CCMComponentPortKind result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>CCM Component Port Kind</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static CCMComponentPortKind get(int value) {
		switch (value) {
		case FACET_VALUE:
			return FACET;
		case SIMPLEX_RECEPTACLE_VALUE:
			return SIMPLEX_RECEPTACLE;
		case MULTIPLEX_RECEPTACLE_VALUE:
			return MULTIPLEX_RECEPTACLE;
		case EVENT_EMITTER_VALUE:
			return EVENT_EMITTER;
		case EVENT_PUBLISHER_VALUE:
			return EVENT_PUBLISHER;
		case EVENT_CONSUMER_VALUE:
			return EVENT_CONSUMER;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private CCMComponentPortKind(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
		return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
		return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
		return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}

} //CCMComponentPortKind
